import { userId } from '@/constant';
import Redirect from 'umi/redirect';
export default props => {
  let id = window.sessionStorage.getItem(userId);
  if (id) {
    return <div>{props.children}</div>;
  } else {
    return <Redirect to="/users/login" />;
  }
};
